For a purpose of disaster recovery, generally, at least two data centers are established, where one data center bears user services, and the other data center backs up data, a configuration, a service, and the like. Active-active data centers refer to that two data centers bear a service at the same time and perform mutual backup such that an overall service capability and system resource utilization of the two data centers are improved.
The two data centers of the active-active data centers send a heartbeat packet to each other every set time, and if the heartbeat packet is not received from each other within the set time, the backup is interrupted. In this case, if both data centers continue bearing the service, a data inconsistency problem may occur. An arbitration mechanism is currently one of means used to avoid occurrence of the data inconsistency problem, and an implementation manner is as follows. The two data centers separately send an arbitration request to an arbitration device that is disposed to be independent from the two data centers. The arbitration device determines a victorious data center according to the arbitration request, and the victorious data center continues providing the service (namely bearing the service) while a losing data center stops providing the service.
During a process of implementing the present disclosure, the inventor finds the following problems.
When the arbitration device encounters a fault, the arbitration mechanism fails. In this case, if the two data centers do not receive the heartbeat packet from each other within the set time, a data center that continues providing the service cannot be determined. In order to avoid the occurrence of the data inconsistency problem, the two data centers stop the service at the same time, which causes a service interruption.